﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BaseUi
{
    /// <summary>
    /// json配置文件
    /// </summary>
    public class JsConfig
    {
        /// <summary>
        /// mysql链接字符串
        /// </summary>
        public string MySql { get; set; }
        /// <summary>
        /// api地址
        /// </summary>
        public string Api { get; set; }
        /// <summary>
        /// plc地址
        /// </summary>
        public string Plc { get; set; }
        /// <summary>
        /// 系统配置
        /// </summary>
        public JsSysConfig Sys { get; set; }
    }

    public class JsSysConfig
    {
        /// <summary>
        /// 是否保存登录历史
        /// </summary>
        public bool IsSaveLogin { get; set; }
        /// <summary>
        /// 登录历史
        /// </summary>
        public List<string> SaveLogin { get; set; }
        /// <summary>
        /// 登录历史数量
        /// </summary>
        public int SaveLoginCount { get; set; }
        /// <summary>
        /// 开机启动
        /// </summary>
        public bool Powerboot { get; set; }
        /// <summary>
        /// 启动全屏
        /// </summary>
        public bool StartupFull { get; set; }
        /// <summary>
        /// 日志保存天数
        /// </summary>
        public int SaveLogDay { get; set; }
    }

    /// <summary>
    /// 设置组基础
    /// </summary>
    public abstract class SetGroupBase
    {
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 排序码
        /// </summary>
        public int Sort { get; set; }
        /// <summary>
        /// 是否选中
        /// </summary>
        public bool IsSelect { get; set; }
        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnabled { get; set; }
    }
}
